package cate.common.table.activity.wishtower.sheet;

import cate.common.table.ESheet;
import cate.common.table.activity.wishtower.row.WishTowerItemRow;

import java.util.List;
import java.util.stream.Collectors;

public class WishTowerItemSheet extends ESheet<WishTowerItemRow> {
    @Override
    public String getSheetName() {
        return "祈愿高塔奖励";
    }

    public List<WishTowerItemRow> getDrawList(int configId, int turn, List<Byte> excludePosList) {
        return getList().stream().filter(e -> e.configId == configId && e.turn == turn && !excludePosList.contains(e.pos)).collect(Collectors.toList());
    }

    public int getItemNums(int configId, int turn) {
        return (int) getList().stream().filter(e -> e.configId == configId && e.turn == turn).count();
    }
}
